#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using i128 = __int128;
const int N = 1e6 + 5;

void FBI(string s) {
    if (s.length() > 1) {
        FBI(s.substr(0, s.length() / 2));
        FBI(s.substr(s.length() / 2, s.length() / 2));
    }
    if (s == string(s.length(), '0')) cout << 'B';
    else if (s == string(s.length(), '1')) cout << 'I';
    else cout << 'F';
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n;
    cin >> n;
    string s;
    cin >> s;
    FBI(s);

    return 0;
}